<!-- 个人资料页面 -->
<template>
	<view class="personal">
		<image :src="imgSrc" mode="aspectFit"></image>
		<view class="item">
			<view class="name">
				<text>昵称</text>
				<text>{{ name }}</text>
			</view>
			<text class="wx-text">微信同步</text>
		</view>
		<!-- <view class="item">
			<view class="name">
				<text>手机号</text>
				<text>16325456545</text>
			</view>
			<text class="wx-text">微信同步</text>
		</view> -->
		<view class="item">
			<view class="name">
				<text>性别</text>
				<text>{{ sex }}</text>
			</view>
		</view>

	</view>
</template>

<script>
	import {shareMixins} from '../../../mixins/share.js'
	export default {
		mixins:[shareMixins],
		data() {
			return {
				shareData: {
				    title: '空港卡券联盟客户端',
				    path: '/pages/index/index' // 分享的页面路径
				},
				name:'',
				imgSrc:'',
				sex:'',
			}
		},
		onLoad() {
			this.loginuserInfo = uni.getStorageSync('loginuserInfo')
			this.name = this.loginuserInfo.nickName
			this.imgSrc = this.loginuserInfo.avatarUrl
			if(this.loginuserInfo.gender == 1){
				this.sex = '男'
			}else if(this.loginuserInfo.gender == 2){
				this.sex = '女'
			}else{
				this.sex = '未知'
			}
			// this.getwechatPersonalData()
		},
		methods: {
			// async getwechatPersonalData(){
			// 	const res = await this.$myRequest({
			// 		url:'/api/user/wechatPersonalData'
			// 	}).then((res) => {
			// 		console.log(res)
			// 	})
			// }
		}
	}
</script>

<style lang="scss" scoped>
	.personal{
		padding: 104rpx 80rpx 0 80rpx;
		background-color: #FFFFFF;
		position: absolute;
		width: 100%;
		height: 100%;
		text-align: center;
		image{
			width: 192rpx;
			height: 192rpx;
			margin-bottom: 84rpx;
			border-radius: 50%;
		}
		.item{
			display: flex;
			justify-content: space-between;
			padding-bottom: 24rpx;
			padding-top: 20rpx;
			border-bottom: 2rpx solid #EEEEEE;
			.name{
				text{
					font-size: 32rpx;
					color: #8B8B8B;
					font-weight: 400;
				}
				text:nth-child(2){
					font-size: 32rpx;
					color: #3C3C3C;
					font-weight: 500;
					margin-left: 72rpx;
				}
			}
			.wx-text{
				color: #EC5F2F;
				font-size: 24rpx;
				border: 2rpx solid #EC5F2F;
				padding: 4rpx 10rpx;
				border-radius: 12rpx;
			}
		}
		view:nth-child(3){
			justify-content: space-between;
			padding-bottom: 24rpx;
			padding-top: 20rpx;
			border-bottom: 2rpx solid #EEEEEE;
			.name{
				text{
					font-size: 32rpx;
					color: #8B8B8B;
					font-weight: 400;
				}
				text:nth-child(2){
					font-size: 32rpx;
					color: #3C3C3C;
					font-weight: 500;
					margin-left: 40rpx;
				}
			}
		}
	}
</style>
 